﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true"
    CodeBehind="Produto.aspx.cs" Inherits="AuctionSite.Cadastros.Produto" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <asp:ScriptManager runat="server"></asp:ScriptManager>
    <fieldset>
        <legend>Novo Produto</legend>
        <table>
            <tr>
                <td width="100px">
                    <strong>Nome Produto:</strong>
                </td>
                <td>
                    <asp:TextBox ID="txtNome" runat="server" />
                    <asp:RequiredFieldValidator ID="Validator_nome" runat="server" ControlToValidate="txtNome"
                        ErrorMessage="* Obrigatório" ForeColor="Red" />
                </td>
            </tr>
            <tr>
                <td>
                    <strong>Descrição:</strong>
                </td>
                <td>
                    <asp:TextBox ID="txtDescricao" runat="server" />
                    <asp:RequiredFieldValidator ID="Valida_Descricao" runat="server" ControlToValidate="txtDescricao"
                        ErrorMessage="* Obrigatório" ForeColor="Red" />
                </td>
            </tr>
            <tr>
                <td>
                    <strong>Categoria:</strong>
                </td>
                <td>
                    <asp:UpdatePanel ID="upCategoria" runat="server">
                        <ContentTemplate>
                            <asp:DropDownList ID="ddlCategoria" runat="server" DataTextField="Nome" DataValueField="Id"
                                AutoPostBack="True" Width="260px" OnSelectedIndexChanged="ddlCategoria_SelectedIndexChanged" />
                        </ContentTemplate>
                        <Triggers>
                            <asp:AsyncPostBackTrigger ControlID="ddlCategoria" />
                        </Triggers>
                    </asp:UpdatePanel>
                </td>
            </tr>
            <tr>
                <td>
                    <strong>SubCategoria:</strong>
                </td>
                <td>
                    <asp:UpdatePanel ID="upSubCategoria" runat="server">
                        <ContentTemplate>
                            <asp:DropDownList ID="ddlSubCategoria" runat="server" DataTextField="Nome" DataValueField="Id"
                                AutoPostBack="False" Width="260px" />
                        </ContentTemplate>
                        <Triggers>
                            <asp:AsyncPostBackTrigger ControlID="ddlSubCategoria" />
                        </Triggers>
                    </asp:UpdatePanel>
                </td>
            </tr>
            <tr>
                <td>
                    <strong>Valor:</strong>
                </td>
                <td>
                    <asp:TextBox ID="txtValor" runat="server" />
                    <asp:RequiredFieldValidator ID="Valida_Valor" runat="server" ControlToValidate="txtValor"
                        ErrorMessage="* Obrigatório" ForeColor="Red" />
                </td>
            </tr>
            <tr>
                <td>
                    <strong>Imagem:</strong>
                </td>
                <td>
                    <asp:FileUpload ID="fupImage" runat="server" />
                    <asp:RequiredFieldValidator ID="Valida_Image" runat="server" ControlToValidate="fupImage"
                        ErrorMessage="* Obrigatório" ForeColor="Red" />
                </td>
            </tr>
            <tr>
                <td>
                    <strong>Data Inicial:</strong>
                </td>
                <td>
                    <asp:TextBox ID="txtDataInicial" runat="server" />
                    <asp:RequiredFieldValidator ID="Valida_DataInicial" runat="server" ControlToValidate="txtDataInicial"
                        ErrorMessage="* Obrigatório" ForeColor="Red" />
                </td>
            </tr>
            <tr>
                <td>
                    <strong>Data Final:</strong>
                </td>
                <td>
                    <asp:TextBox ID="txtDataFinal" runat="server" />
                    <asp:RequiredFieldValidator ID="Valida_DataFinal" runat="server" ControlToValidate="txtDataFinal"
                        ErrorMessage="* Obrigatório" ForeColor="Red" />
                </td>
            </tr>
            <tr>
                <td>
                    <strong>Tipo do Leilão:</strong>
                </td>
                <td>
                    <asp:RadioButtonList ID="rbTipo" runat="server" RepeatDirection="Horizontal">
                        <asp:ListItem Selected="True" Value="N">Normal</asp:ListItem>
                        <asp:ListItem Value="R">Reverso</asp:ListItem>
                    </asp:RadioButtonList>
                </td>
            </tr>
            <tr>
                <td colspan="2" align="right">
                    <asp:Button ID="btnSalvar" runat="server" Text="Cadastrar" OnClick="btnSalvar_Click" />
                </td>
            </tr>
        </table>
    </fieldset>
</asp:Content>
